package com.jvm123.blog.service

import com.jvm123.blog.dao.MenuRepos
import com.jvm123.blog.entity.Menu
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service

/**
 *
 * @author yawn http://jvm123.com
 *     2019/10/22 12:09
 */
@Service
class MenuServiceImpl implements MenuService {

    @Autowired
    MenuRepos menuRepos

    @Override
    List<Menu> getMainMenu() {
        menuRepos.findByMenuGroupOrderByMenuOrderAsc("main")
    }

    @Override
    List<Menu> getTopMenu() {
        menuRepos.findByMenuGroupOrderByMenuOrderAsc("top")
    }
}
